/* ===========================================================
			Resonance
	NPC Name: 		Giant Pole Arm
	Map(s): 		Snow Island: Rien (140000000)
	Description: 	Quest - A Hero That Uses Pole Arm
=============================================================
Version 1.0 - Script Done.(11/6/2010)
=============================================================
*/
importPackage(Packages.client)

var status = -1;

function start(mode, type, selection) {
    status++;
	if (mode != 1) {
	    if(type == 1 && mode == 0)
		    status -= 2;
		else{
			if(status == 1){
			qm.sendNext("(.#b(I better think twice about this...)#k");
			qm.dispose();
			return;
			} else {
				qm.warp(914090100);
				qm.gainItem(1142129, 1);
				qm.showInfo("You have earned the title<Awakened Aran>");
				qm.dispose();
				return;
			}
		}
	}
	if (status == 0)
		qm.sendYesNo("#b(Am I 100% sure I was the hero that used #p1201001#? Yes, I was, and I am going to really hold on to #p1201001# tight, so that it'll react.)#k");
	if (status == 1){
		qm.forceCompleteQuest();
		qm.getPlayer().changeJob(MapleJob.ARAN1);
		qm.getPlayer().setStr(35);
		qm.getPlayer().setDex(4);
		qm.getPlayer().setRemainingAp((qm.getPlayer().getLevel() - 1) * 5 - 22);
		qm.getPlayer().setRemainingSp((qm.getPlayer().getLevel() - 10) * 3 + 1);
		qm.getPlayer().setMaxHp(qm.getPlayer().getMaxHp() + 275);
		qm.getPlayer().setMaxMp(qm.getPlayer().getMaxMp() + 15);
		qm.getPlayer().changeSkillLevel(SkillFactory.getSkill(20009000), 0, -1);
		qm.getPlayer().changeSkillLevel(SkillFactory.getSkill(20009000), 1, 0);
		qm.showInfo("You have acquired the Pig's Weakness skill.");
		qm.PlayerToNpc("#b(I feel like something's popping up in my head...)#k");
	}if(status == 2)
		qm.sendYesNo("Would you like to skip the video clip?  Even if you skip the scene, game play will not be affected.");
	if(status == 3){
		qm.warp(140000000);
		qm.forceCompleteQuest(29924);
		qm.gainItem(1142129, 1);
		qm.showInfo("You have earned the title<Awakened Aran>");
		qm.dispose();
		}
	}